*##==============================================================##*
*## REPLICATION DO-File 										 ##*					
*## Paper: Personal Votes, Electoral Competitiveness of Parties, ##*
*## 	   and Legislative Representation in Taiwan under SNTV.  ##*
*## Journal: Japanese Journal of Political Science 				 ##*
*## Authors: Jinhyeok Jang and Nick Lin							 ##*
*## Date: January 1st, 2019									     ##*
*##==============================================================##*


*## Read Data
clear all
cd "/Users/A Folder"
use "Jang_Lin_JJPS_data.dta"

*### Variable Description ###*
/* 
##  Major DV: coMedDist_dir 
	   ==> Distance from camp median with direction. 
		   Greater values indicate more extreme positions than the median
		   position of a party camp, while smaller values represent more 
		   moderate positions than the median of the camp. 
		   
##  Main variable of interest: myCampMargin
	   ==> The electoral margin of a legislator's camp in the district where
		   the legislator was elected.
	   
##  Control Variables:
	* pan_blue      ==> Pan-blue members (KMT+PFP+NP)
	* seniority 	==> # of terms a legislator has served.  
	* gov_coalition ==> In the same camp as the president.
	* samp_camp_governor ==> In the same camp as the mayor of one's district.
	* ln_dm         ==> district magnitude (logged)
	* numCoPartisanCamp	==> # of co-partisan candidates running in the prior election.
	* north         ==> Northern cities 
	* south         ==> Southern cities
*/


*## Models in Table 1

*# Model 1
reg coMedDist_dir myCampMargin2 i.term, robust

*# Model 2
reg coMedDist_dir myCampMargin2 pan_blue seniority gov_coalition /*
*/	same_camp_governor ln_dm numCoPartisanCamp north south i.term, robust
